package org.dong.service.Impl;


import org.dong.mapper.UserMapper;
import org.dong.pojo.User;
import org.dong.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements UserService {

    @Resource
    UserMapper userMapper;

    @Override
    public User getUser(String cardId,Integer id,String phone) {

        return userMapper.getUser(cardId,id,phone);
    }

    @Override
    public Integer addUser(User user) {
        final Integer integer = userMapper.addUser(user);
        return integer;
    }

    @Override
    public User checkLogin(String account, String password) {
        return userMapper.checkLogin(account,password);
    }
}
